package org.hishenframework.web.validate.jqvalidate;

import java.lang.annotation.Annotation;
import java.util.List;

/**
 * 常见验证器
 * @author didi
 *
 */
public class CommonJsr2JqValidate extends AbstractJsr2JqValidate{

	/** 验证注解类型 */
	private Class<?> annotationType;
	
	/** 映射的jquery.validator.规则名称 */
	private String jqueryValidatorRule;
	
	/** 参数 */
	private List<String> params;
	
	@Override
	public Class<?> getAnnotationType() {
		return annotationType;
	}
	
	@Override
	public JqueryValidateRule toJqueryValidatorRule(Annotation annotation) {
		return JqueryValidatorRuleUtil.toRule(annotation, jqueryValidatorRule, params);
	}

	public void setAnnotationType(Class<?> annotationType) {
		this.annotationType = annotationType;
	}

	public void setParams(List<String> params) {
		this.params = params;
	}

	public void setJqueryValidatorRule(String jqueryValidatorRule) {
		this.jqueryValidatorRule = jqueryValidatorRule;
	}

}
